package com.example.app;

import android.os.AsyncTask;

import com.example.app.i.OnCompleteListener;

/**
 * Created by ZLW on 2017/7/1.
 */

public class MyAsyncTask extends AsyncTask<Void, Void, String> {

    private OnCompleteListener mListener;

    public MyAsyncTask() {

    }

    public MyAsyncTask(OnCompleteListener listener) {
        this.mListener = listener;
    }

    @Override
    protected String doInBackground(Void... params) {
        return "I'm is good man!";
    }

    @Override
    protected void onPostExecute(String s) {
        if (mListener != null) {
            mListener.onComplete(s);
        }
    }

}
